<?php
spl_autoload_register(function($className) {
    $className = trim($className, '\\');
    $className = str_replace('\\', '/', $className);
    $dst = __DIR__ . '/' . $className . '.php';
    if(is_file($dst)){
        include_once $dst;
    }
    
});